<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>

<% 
request.setCharacterEncoding("UTF-8");//中文处理

   String c=request.getParameter("content");//发送的信息
   
   String name=(String)session.getAttribute("u");//谁发送的信息
   String content=name+":"+c+"<br>";
   
  String str=(String)application.getAttribute("info");
       if(str==null){
    	   str="";
       }
       str+=content;
       
       application.setAttribute("info", str);
       
       response.sendRedirect("send.jsp");
%>

</body>
</html>